package com.pks.datacenter.utils;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

public class SUtilClass {
	
	public static Annotation getFieldAnnotation(Object object, String propertyName, Class clz) {
    	Field[] fields = object.getClass().getDeclaredFields();
    	for (Field field : fields) {
			if (field.getName().equals(propertyName)) {
				if (field.isAnnotationPresent(clz)) {
					return field.getAnnotation(clz);
				}
			}
		}
    	return null;
    }
}
